package com.jingdianjichi.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jingdianjichi.subject.infra.basic.entity.SubjectCategory;
import com.jingdianjichi.subject.infra.basic.entity.SubjectLabel;
import com.jingdianjichi.subject.infra.basic.mapper.SubjectLabelMapper;
import com.jingdianjichi.subject.infra.basic.service.SubjectCategoryService;
import com.jingdianjichi.subject.infra.basic.mapper.SubjectCategoryMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
* @author 20432
* @description 针对表【subject_category(subject_category)】的数据库操作Service实现
* @createDate 2025-10-03 16:36:14
*/
@Service
public class SubjectCategoryServiceImpl extends ServiceImpl<SubjectCategoryMapper, SubjectCategory>
    implements SubjectCategoryService{

    @Resource
    private SubjectCategoryMapper subjectCategoryMapper;
    @Override
    public SubjectCategory queryById(Long id) {
        SubjectCategory subjectCategory = subjectCategoryMapper.queryById(id);
        return subjectCategory;
    }

    @Override
    public void insert(SubjectCategory subjectCategory) {
        subjectCategoryMapper.insert(subjectCategory);
    }

    @Override
    public List<SubjectCategory> queryCategoryList(SubjectCategory subjectCategory) {
        List<SubjectCategory> subjectCategories= subjectCategoryMapper.queryCategoryList(subjectCategory);
        return subjectCategories;
    }

    @Override
    public void removeByCategoryId(Long id) {
        subjectCategoryMapper.removeByCategoryId(id);
    }

    @Override
    public void updateInfo(SubjectCategory subjectCategory) {
        subjectCategoryMapper.updateInfo(subjectCategory);
    }

    @Override
    public Integer queryCount(Long id) {
        return subjectCategoryMapper.querySubjectCount(id);
    }


}




